-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Properly check header before extracting the bearer token #42595
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @gsmet
|
||
if (authHeader == null || !authHeader.startsWith(BEARER_PREFIX)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be tests have some spaces around... It all looks fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test I checked is using Bearer: <token>
with a colon which is AFAICS incorrect. I'll go fix it I suppose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added an additional commit, I'm in the middle of something and can't test my tree.
The header should be: Authorization: Bearer <token> and not Authorization: Bearer: <token>
Status for workflow
|
@sberyozkin I let you check that I’m correct regarding the tests. All the examples I could find didn’t have a colon. |
Thanks @gsmet This extension was added by Loic long time ago, he did not like the idea of depending on smallrye-jwt. This extension is light weight indeed but it only supports the remote token introspection via Elytron AFAIK |
Thanks @michalvavrik |
Fixes #42591